Skip to content

Conversation

@pcanal
Copy link
Member

@pcanal pcanal commented Aug 26, 2025

Clang-format v20.1.0 and above have a new sub-option AlignFunctionDeclarations (part of the option AlignConsecutiveDeclarations) (see https://clang.llvm.org/docs/ClangFormatStyleOptions.html).

This PR was made to see how clang-formatting some of the core ROOT source would look like with it.

The alignment of functions is actually pretty close to what we expect/want.

However the enums declaration might still benefit from AlignConsecutiveAssignments but it would apply to all assignment (which has been controversial).

Ubuntu 24 does not have clang-format v20 and thus a bit a gymnastic was needed to install it.

The new sub-option is fatal to older version of clang-format, so we would all be required to use/install clang-format v20 and newer (v21 was just released on August 26).

@pcanal pcanal self-assigned this Aug 26, 2025
@github-actions
Copy link

github-actions bot commented Aug 26, 2025

Test Results

    22 files      22 suites   3d 15h 33m 2s ⏱️
 3 788 tests  3 788 ✅ 0 💤 0 ❌
75 270 runs  75 270 ✅ 0 💤 0 ❌

Results for commit 2d84412.

♻️ This comment has been updated with latest results.

Copy link
Member

@vepadulano vepadulano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would personally favour this move 👍

@pcanal pcanal requested review from dpiparo and removed request for dpiparo November 6, 2025 18:19
@pcanal pcanal requested review from dpiparo and removed request for dpiparo February 8, 2026 15:05
@pcanal pcanal force-pushed the align-function branch 2 times, most recently from 88da441 to c1ea1ff Compare February 8, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants